<style scoped lang="less">
    .main {
        height: 100%;
    }
</style>

<template>
    <div class="main">
        <main-theme1>
            <router-view></router-view>
        </main-theme1>
        <customer></customer>
    </div>
</template>

<script>
import { mapActions } from 'vuex'
import MainTheme1 from '@/components/layout/theme1'
import Customer from '@/components/customer/index'

export default {
  components: { Customer, MainTheme1 },
  data () {
    return {
      show: false
    }
  },
  methods: {
    ...mapActions([
      'getUserInfo',
      'getPhpMenusData',
      'getJavaMenusData',
      'setBreadCrumb'
    ]),
    customerShow () {
      this.show = !this.show
    }
  },
  mounted () {
    this.getUserInfo().then(ret => {
      if (ret.errcode === 1001) {
      } else {
        this.$router.push({
          name: 'login'
        })
      }
    })
    this.getJavaMenusData(this.$store.state.app.menuSelectId)
  }
}
</script>
